package com.qcby.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.qcby.model.Movie;
import com.qcby.model.dto.MovieActorVo;
import com.qcby.model.dto.MovieConsoleVo;
import com.qcby.model.dto.MovieShowVo;
import com.qcby.query.MovieQuery;


public interface MovieMapper extends BaseDao<MovieQuery, Movie> {
    public Integer getMid(String mName);

    List<MovieShowVo> getByMName(@Param("mName") String mName, @Param("startNum") Integer startNum,
                                 @Param("pageSize") Integer pageSize);

    Integer getByMNameCount(@Param("mName") String mName);

    MovieShowVo getCommentByMid(@Param("mid") Integer mid);

    List<MovieActorVo> getActorByMid(@Param("mid") Integer mid);

    List<MovieShowVo> selectOrderByScore(@Param("mtId") Integer mtId, @Param("movieYear") String movieYear,
                                         @Param("startNum") Integer startNum, @Param("pageSize") Integer pageSize);

    Integer selectOrderByScoreCount(@Param("mtId") Integer mtId, @Param("movieYear") String movieYear);

    List<MovieShowVo> selectOrderByOrder(@Param("mtId") Integer mtId, @Param("movieYear") String movieYear,
                                         @Param("orderBy") String orderBy, @Param("startNum") Integer startNum,
                                         @Param("pageSize") Integer pageSize);

    Integer selectOrderByOrderCount(@Param("mtId") Integer mtId, @Param("movieYear") String movieYear,
                                    @Param("orderBy") String orderBy);

    public void takeOffMovie(Integer mid);

    List<MovieConsoleVo> query(@Param("mtId") Integer mtId, @Param("mName") String mName,
        @Param("mStatus") String mStatus, @Param("startNum") Integer startNum, @Param("pageSize") Integer pageSize);

    Integer queryCount(@Param("mtId") Integer mtId, @Param("mName") String mName, @Param("mStatus") String mStatus);
}
